package com.api.entity;


import com.api.log.FieldAnnotation;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.activerecord.Model;

import java.util.Date;


import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
* 轮播图 实体类。
*
* @author yangsf
* @since 2024-10-22
*/
@Accessors(chain = true)
@Data(staticConstructor = "create")
@EqualsAndHashCode(callSuper = true)
@Table("tb_banner")
public class Banner extends Model<Banner> {

private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    @FieldAnnotation("id")
    private Long id;

    /**
    * 标题
    */
    @FieldAnnotation("标题")
    private String title;

    /**
    * 地址
    */
    @FieldAnnotation("地址")
    private String path;

    /**
    * 备注
    */
    @FieldAnnotation("备注")
    private String remark;

    /**
    * 跳转链接
    */
    @FieldAnnotation("跳转链接")
    private String link;

    /**
    * 排序
    */
    @Column("sortNum")
    @FieldAnnotation("排序")
    private Integer sortNum;

    /**
    * 状态：1.正常 0.删除
    */
    @FieldAnnotation("状态：1.正常 0.删除")
    private Integer status;

    /**
    * 上传时间
    */
    @Column(onInsertValue = "now()")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @FieldAnnotation("上传时间")
    private Date createTime;

    /**
    * 上传人
    */
    @FieldAnnotation("上传人")
    private Long createUserId;

}
